package com.example.fragment;

import com.ab.view.listener.AbOnListViewListener;
import com.ab.view.pullview.AbPullListView;
import com.benchi.ncar.R;
import com.example.tools.Constants;
import com.example.tools.IsNetWork;
import com.lidroid.xutils.ViewUtils;

import android.app.ProgressDialog;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.TextView;

public class PalmtopFragment extends BaseFragment {

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		if (mRootView == null) {
			mRootView = inflater.inflate(R.layout.home, container, false);
			ViewUtils.inject(this, mRootView);
			initViews();
			super.url = Constants.PALMTOP_URL;
			super.mRlHeadView.setVisibility(View.GONE);
			super.showWaittingDialog();
		}
		initData(super.url);
		if (getArguments() != null) {
			try {
				Thread.sleep(500);
				webview.loadUrl(getArguments().getString("url"));
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		ViewGroup parent = (ViewGroup) mRootView.getParent();
		if (parent != null) {
			parent.removeView(mRootView);
		}
		return mRootView;
	}
}
